/**                                
 * Copyright ® 2013 东软集团股份有限公司
 * 版权所有。     
 */ 

package practice2.annotation;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

/**
 * <p>Class       : practice2.TheMain
 * <p>Descdription: 类功能描述
 * @author  顾力行-gulx@neusoft.com
 * @version 1.0.0
 */
public class SpringAnnotationTest {
	public static void main(String args[]) throws UnsupportedEncodingException {

		String url = MyAction.class.getResource("").getPath();
		url = URLDecoder.decode(url, "UTF-8");
		ApplicationContext ctx = new FileSystemXmlApplicationContext(url + "applicationContext.xml");
		MyAction action = (MyAction) ctx.getBean("myAction");
		try {
			action.execute();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
